package com.imy.luasupport.bridge;

import android.util.Log;

import com.imy.luasupport.core.LuaCore;
import com.imy.luasupport.interfaces.IAppLoad;

import org.luaj.vm2.Globals;

import java.util.HashMap;

public class BridgeRegister {

    public static HashMap<String,Object> bridgeService =new HashMap<>();
    public static final String APP_LIFE_CYCLE="app_life_cycle";
    public static void reg(Globals mGlobals){
        AppLoadImpl appLoad = new AppLoadImpl(mGlobals);
        bridgeService.put(APP_LIFE_CYCLE,appLoad.getInterfaces());
    }


    public static <T>  T getBridge(String service){
      return (T) bridgeService.get(service);
    }
}
